%!TEX root = all.tex

\section{RESULTS OF THE 3D EXPERIMENTS}
\subsection{Exponential Profile 3D}
We chose the following function for describing the bell-shaped exponential 3D profile:

\begin{equation}
f(x,y,z,t) = 4 \cdot exp\left(\frac{-1}{d_{x}(1 - d_{x})}\right) \cdot exp\left(\frac{-1}{d_{y}(1-d_{y})} \right) \cdot exp\left(\frac{-1}{d_{z}(1-d_{z})} \right)
\end{equation}
where,
\begin{align*}
&d_{x} = \frac{x + 0.3}{0.6},  d_{y} = \frac{y + 0.3}{0.6}, d_{z} = \frac{z + 0.3}{0.6}\\
\end{align*}


Similar to the 2D experiments in the Technical Report \cite{R8} three sets of tests were ran:
\begin{compactenum}
\item Gradient Limiter is enabled, and second order.  Results of the experiment are presented in section \ref{sec:6.1.1}
\item First order is the desired order of accuracy of the solution. Results are presented
in section \ref{sec:6.1.2}.
\item Gradient limiter disabled (or, in other words, gradient limiter values are set to 1)
and second order is the desired order of accuracy of the solution. Results are
presented in section \ref{sec:6.1.3}.
\end{compactenum}

%\hfill\\
%All 3D tests were ran with mesh sizes:
%\begin{compactitem}
%\item 40x40x40 ($\Delta x = \Delta y = \Delta z$ = 0.01m)
%\item 80x80x80 ($\Delta x = \Delta y = \Delta z$ = 0.005m)
%\item 160x160x160 ($\Delta x = \Delta y = \Delta z$ = 0.0025m)
%\end{compactitem}

\subsubsection{Second order accuracy, gradient limiter enabled} \label{sec:6.1.1}
First, we ran mesh refinement experiments (with the grid refinement ratio equal to 2) on
the exponential profile, gradient limiter enabled in the solver (ICE) and desired order of
accuracy equal to two.
\\
\\
Figures 1(a) to 1(d) and 2(a) to 2(d) show results of the experiments  (L$_{2}$ and L$_{\infty}$ errors) and their ratios as
functions of time for the source terms from analytical solution and ICE-generated
solution correspondingly. Figures 1(e) and 2(e) show the approximate computed errors and
observed order of accuracy for analytical and ICE-generated solutions at
timestep 10.
\\
\\
These data show that the discretization error is consistent
(the L$_{2}$-norm decreases by a factor of approximately 2.6-2.8 and L$_{\infty}$-norm decreases by a
factor of 0.9-2.0 when we refine our grid by a factor of two). However, the order of
accuracy doesn't match our expectations and theoretical predictions. Instead of order of
accuracy two, we got approximately 1.4-1.5 (for L$_{2}$-norm) and 0.9-1.0 (for L$_{\infty}$-norm).
We conclude that the reduced order is the result of the active gradient limiter introducing lower
order approximations locally into specific parts of the domain.

\subsubsection{First order accuracy} \label{sec:6.1.2}
As a result, we decided to reduce the desired order of accuracy to one and run the same
set of tests (mesh size is 40x40x40, 80x80x80, 160x160x160) in order to see how
the solver will perform. The results are shown in tables \ref{tbl:1} and \ref{tbl:2}.
\\
\\
As we can see from the results, discretization errors are consistent and go down by a
factor of two when resolution is increased by a factor of two. The resulting order of
accuracy is equal to the expected value - one - for both solver generated and analytical
function generated sources.


\subsubsection{Second order accuracy, gradient limiter disabled} \label{sec:6.1.3}
To evaluate the effect of the gradient limiter on the order of accuracy of the solution we
decided to run an experiment with the desired order accuracy equal to two and gradient
limiter disabled. In other words, the values of gradient limiter are set to one. We are
testing the same mesh sizes as before  40x40x40, 80x80x80 and 160x160x160.
Similar to the first two experiments, the results are presented in tables \ref{tbl:3} and \ref{tbl:4}.  And, as expected 
the observed order of accuracy agrees with the theoretical order of two. 
\\
\\
%The results show that disabling the gradient limiter gives us the expected order of
%accuracy very near two in both solver-generated sources and source generated from
%the analytical function.



\input{2ndorder_gradient_exact}
\input{2ndorder_gradient_ice}


%\\
%\\
%Figure 10 shows where the worst errors are occurring at y=0 and time step = 1. The
%figure shows the plot of the computed solution u2 and the difference between computed
%and exact solutions (\emph{u$_{2}$} - \emph{u$_{1}$}) when:
%
%\begin{enumerate}
%\item[]
%\begin{compactenum}[1.]
%\item the desired order of accuracy is one;
%\item the desired order of accuracy is two and gradient limiter values are set to 0;
%\item the desired order of accuracy is two and gradient limiter values are set to 0.5;
%\item the desired order of accuracy is two and gradient limiter values are set to 1 (or, in
%other words, gradient limiter is disabled);
%\item the desired order of accuracy is two and gradient limiter values are set to 0.75;
%\item the desired order of accuracy is two and gradient limiter values are enabled (in
%other words set to the computed values).
%\end{compactenum}
%\end{enumerate}
%
%As we can see from the figure when the desired order of accuracy is one, the worst errors
%occur at the peak of the bell-shaped profile (the error at the peak is on order of 10$^{-8}$) and
%around point -0.2 and 0.2  around the points where gradient changes rapidly. Setting the
%desired order of accuracy to two and gradient limiter value to zero is equivalent to the
%first order test. The figure indicates that, indeed, in this case we get the same errors as in
%case of the first order accuracy.
%\\
%\\
%Setting the desired order of accuracy to two and enabling the gradient limiter (setting it to
%the computed values) reduces the error at the peak by a factor of two, and is equal to the
%error when gradient limiter is set to 0.5. The errors at the other locations where the
%gradient changes rapidly are approximately ten times smaller than in case of the first
%order of accuracy test.
%\\
%\\
%Finally, we can conclude that for fixed values of the gradient limiter as their (gradient
%limiters) values approach one the errors go to zero.

\section{Conclusion}
Experimenting with the ICE code using the Method of Generated Solutions (MGS) in 1D, 2D, and 3D cases it is shown that the errors reduce consistently by a factor of two (for 1st order case) when the mesh size is doubled.  Also, observed order of accuracy agrees with the theoretical predictions when the desired order of accuracy is set to two and when gradient limiter is disabled in the code.  Thus, unlike other methods such as MMS, the MGS method leads to a more accurate verification of the ICE code.

\section{Future Work}
For the future, much more work needs to be done using MGS.  The remaining modules of ICE need to be verified, in higher dimensions as well, and verified based on real experimental measurements and data.  Other approximation schemes should be used in conjunction with MGS.  In our experiment we used splines,  other approximation methods should be used, such as e.g., least squares technique.


\input{1storder_gradient_exact}
\input{1storder_gradient_ice}
\input{2ndorder_gradientdis_exact}
\input{2ndorder_gradientdis_ice}


